package com.umeox.watch.moto.sos;

import android.app.Application;
import android.content.Context;

import com.tencent.mmkv.MMKV;
import com.umeox.watch.moto.dataservice.DataProvider;

import uk.co.chrisjenx.calligraphy.CalligraphyConfig;


public class BaseApp extends Application {
    public final static String SOS_STATUS = "sos_status";
    private static BaseApp instance;

    public static Context getInstance() {
        return instance;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;
        DataProvider.initialize(this);
        MMKV.initialize(this);
        MMKV.defaultMMKV().remove(SOS_STATUS);

        CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
                .setDefaultFontPath("fonts/Roboto-Medium.ttf")
                .setFontAttrId(R.attr.fontPath)
                .build()
        );
    }
}
